import java.io.File;

//TIP To <b>Run</b> code, press <shortcut actionId="Run"/> or
// click the <icon src="AllIcons.Actions.Execute"/> icon in the gutter.
public class Main {
    public static void main(String[] args) {
        String path = "D:\\JSD2405-SSM\\笔记\\07微博项目笔记";
        File file = new File(path);
        boolean exists = file.exists();
        boolean directory = file.isDirectory();
        System.out.println("exists : "+exists);
        System.out.println("isDirectory: "+directory);
        String parent = file.getParent();
        System.out.println("parent: "+parent);
        String name = file.getName();
        System.out.println("name: " + name);
        System.out.println("全路径："+ parent+name);

        File absoluteFile = file.getAbsoluteFile();
        System.out.println("absoluteFile: "+absoluteFile);

        String path1 = file.getPath();
        System.out.println("path: " +path1);
    }
}